﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CarterWechatServer.DataEntity.Entities
{
    /// <summary>
    /// 菜品实体类
    /// </summary>
    [Table("Dish")]
    public class DishEntity
    {
        /// <summary>
        /// 菜品Id
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 菜品名称
        /// </summary>
        [Required]
        [StringLength(50)]
        public string DishName { get; set; }

        /// <summary>
        /// 单价
        /// </summary>
        public int UnitPrice { get; set; }

        /// <summary>
        /// 会员价
        /// </summary>
        public int MemberPrice { get; set; }

        /// <summary>
        /// 菜品图片链接
        /// </summary>
        public string ImageUrl { get; set; }

        /// <summary>
        /// 是否为推荐菜品
        /// </summary>
        public bool IsRecommend { get; set; }

        [ForeignKey("Category")]
        public int CategoryId { get; set; }

        public virtual DishCategoryEntity  Category { get; set; }
    }
}
